const gulp = require('gulp')
const rename = require('gulp-rename')
// const shell = require('gulp-shell')
// const concat = require('gulp-concat')
// const merge = require('merge-stream')
// const streamqueue = require('streamqueue')
// const run_sequence = require('run-sequence')
const ftp = require('gulp-ftp')

gulp.task('conf_testing', function () {
    gulp.src('app_config.testing.js')
        .pipe(rename('app_config.js'))
        .pipe(gulp.dest('.'))
})

gulp.task('conf_production', function () {
    gulp.src('app_config.production.js')
        .pipe(rename('app_config.js'))
        .pipe(gulp.dest('.'))
})

gulp.task('ftp_testing', function () {
    gulp.src('./dist/**/*')
        .pipe(ftp({
            host: '101.201.115.186',
            user: 'www.staging.2ours.net|wwwftp',
            pass: 'Shichen_',
            remotePath: "/"
        }))
})

gulp.task('ftp', function () {
    gulp.src('./dist/**/*')
        .pipe(ftp({
            host: '101.201.115.186',
            user: 'www.2ours.net|wwwftprelease',
            pass: 'Shichen0907_',
            remotePath: "/"
        }))
})